<template>
  <div class="gsgl">
    <div class="head">
      <span>各省各类计划录取状态</span>
      <button>
        <a
          :href="'http://118.31.51.131:8081/api/zsxt/lqgl/dc?token=' + token"
          download="各省各类计划录取状态.csv"
          >导出</a
        >
      </button>
      <button>退出</button>
    </div>

    <el-table :data="tableData" height="720" border style="width: 100%">
      <!-- <el-table-column type="index" label="序号" width="400"></el-table-column> -->
      <el-table-column prop="sfmc" label="省份" width="80"> </el-table-column>
      <el-table-column prop="gjzx" label="国家专项" width="80">
      </el-table-column>
      <el-table-column prop="gat" label="港澳台" width="80"> </el-table-column>
      <el-table-column prop="ykrx" label="预科入校" width="80">
      </el-table-column>
      <el-table-column prop="gxzx" label="高校专项" width="80">
      </el-table-column>
      <el-table-column prop="dkyxw" label="单科优秀(文)" width="80">
      </el-table-column>
      <el-table-column prop="dkyxl" label="单科优秀(理)" width="80">
      </el-table-column>
      <el-table-column prop="ptw" label="普通(文)" width="80">
      </el-table-column>
      <el-table-column prop="pyl" label="普通(理)" width="80">
      </el-table-column>
      <el-table-column prop="gspyst" label="高水平艺术团" width="80">
      </el-table-column>
      <el-table-column prop="gspydy" label="高水平运动员考生" width="80">
      </el-table-column>
      <el-table-column prop="ys" label="艺术" width="80"> </el-table-column>
      <el-table-column prop="bss" label="保送生" width="80"> </el-table-column>
      <el-table-column prop="ssmzyk" label="少数民族预科" width="80">
      </el-table-column>
      <el-table-column prop="xzb" label="西藏班" width="80"> </el-table-column>
      <el-table-column prop="xjb" label="新疆班" width="80"> </el-table-column>
      <el-table-column prop="xjxzjh" label="新疆协作计划" width="80">
      </el-table-column>
      <el-table-column prop="ptzh" label="普通(综合)" width="80">
      </el-table-column>
      <el-table-column prop="erxw" label="第二学位" width="80">
      </el-table-column>
      <el-table-column prop="mdfz" label="民大附中"> </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { request } from "../../network/request";
export default {
  name: "",
  data() {
    return {
      token: sessionStorage.getItem("token"),
      tableData: [
      ],
    };
  },
  methods: {},
  created() {
    request({
      url: "http://118.31.51.131:8081/api/zsxt/lqgl/ckzt",
      method: "post",
      params: {
        token: sessionStorage.getItem("token"),
      },
    }).then((value) => {
      console.log(value.data);
      this.tableData = value.data
    });
  },
  beforeCreate() {
    if (sessionStorage.getItem("token") == null) {
      this.$router.push("/login");
    } else {
      let token = sessionStorage.getItem("token");
      let length = sessionStorage.getItem("token").length;
      if (token[length - 4] == "0") {
        this.$router.replace("/login");
      }
    }
  },
  components: {},
};
</script>

<style scoped>
.head {
  height: 80px;
  border-bottom: 1px solid black;
}
.head span {
  font-size: 20px;
  line-height: 80px;
  margin-left: 25px;
}
.head button:nth-of-type(1) {
  margin-left: 1000px;
}
.head button:nth-of-type(2) {
  margin-left: 100px;
}
a {
  display: inline-block;
  width: 100px;
  height: 50px;
  line-height: 50px;
  text-decoration: none;
  color: #fff;
}
button {
  width: 100px;
  height: 50px;
  border: none;
  outline: none;
  cursor: pointer;
  color: #fff;
  background-color: rgb(192, 51, 56);
}
button:active {
  opacity: 0.8;
}
.gsgl ::v-deep .el-table .cell {
  text-align: center;
}
</style>